home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / CAD / LISP04.ARJ / BALLOON.LSP next >
Text File  |  1989-05-07  |  860b  |  30 lines

  1. (Vmon)  ;Virtual Memory On 
  2. ;   13.  Part identifier (balloonc) 
  3.  
  4. ;13.  Draws part identifier - a balloon containing a  
  5. ;     number, then a leader to the object. 
  6. (Defun C:Balloonc (/ P1 P2 P3 P4 A) 
  7.        (Setq DS (Getreal "\nEnter the Dimscale: ")) 
  8.        (Setvar "Cmdecho" 0) 
  9.        (Setq P1 (Getpoint "\nFrom point: ")) 
  10.        (Setq P2 (Getpoint "\nTo point: ")) 
  11.        (If (<= (Car P2) (Car P1)) 
  12.            (Setq A (* -0.25 DS)) (Setq A (* 0.25 DS)) 
  13.        ) 
  14.        (Setq P3 (List (+ (Car P2) A) (Cadr P2))) 
  15.        (Setq P4 (List (+ (Car P3)(/ A 2)) (Cadr P3))) 
  16.        (Command "Layer" "S" "4" "") 
  17.        (Command "Dim1" "Leader" P1 P2 P3 "" "") 
  18.        (Setq A "Cballoon") 
  19.        (Command "Insert" A P4 DS "" "0") 
  20.  
  21.  
  22. ;19. Error. 
  23. (Defun *error* (st) 
  24.   (Princ "Error: ") 
  25.   (Princ st) 
  26.   (Terpri)) 
  27.  
  28.